<?php
/**
 * Created by PhpStorm.
 * User: zl
 * Date: 2017/6/23
 * Time: 22:58
 */
    require_once('../Common.php');
    require_once('../BusinessFee/BusinessFee.php');
    require_once('PDFCreator.php');
    $appID = $_REQUEST['approval_id'];
    $b_fee = new BusinessFee();


    $r = $b_fee->getOverStandardApprove($appID);
    $result_array = array();
    if(!$r){
        $result_array['state'] = 0;
        $result_array['error'] = "DB_ERROR";
    }
    else{
        $result_array['state'] = 1;
        $pdf = new PDFCreator();

        $result_array['url'] = $pdf->createOverStandardPDF($r);
    }

    echo json_encode($result_array);

?>